// Standard include guard
#ifndef TIMEHANDLER_HPP
#define TIMEHANDLER_HPP

/**
  * @file TimeHandler.hpp
  * @author Ryan Van Why
  * @brief This manages the timing for this framework.
  */

// SFML
#include <SFML/Window.hpp> // For retrieving delta times

// This controls the maximum amount of time that can elapse in one frame (in seconds).
#define MAX_FRAME_TIME 0.2

// Our namespaces
namespace mindsweeper {
namespace main {

class TimeHandler {
	public:
		/**
		  * @brief This gets the delta time for this frame.
		  * @return The delta time, in seconds.
		  */
		double getDt();

		/**
		  * @brief This updates the timing system for a new cycle.
		  */
		void update();

	private:
		// Our Clock instance, for retrieving time info
		sf::Clock clock;

		// Delta time for this cycle
		double dt;
};

// End namespaces
}
}

#endif // TIMEHANDLER_HPP
